package com.leeon.array;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ArrayOfGenerics {

	@SuppressWarnings("unchecked")
	public static void main(String[] args){
		List<String>[] ls;
		List[] la = new List[10];
		ls = (List<String>[])la;
		ArrayList<String> as = new ArrayList<String>();
		as.add("a");
		ls[0] = as;
		//ls[1] = new ArrayList<Integer>();
		Object[] objects = ls;
		ArrayList<Integer> ai = new ArrayList<Integer>();
		ai.add(45);
		objects[1] = ai;
		
		System.out.println(Arrays.deepToString(objects));
	}
	
}
